package com.epam.manager.controller;

import javax.faces.model.DataModel;
import javax.faces.model.ListDataModel;

import com.epam.DAO.RequestDAO;
import com.epam.DAO.Factories.DAOFactory;
import com.epam.entity.Request;

public abstract class RequestController {
	
	protected DAOFactory daoFactory;	
	protected RequestDAO requestDAO;
	
	protected DataModel<Request> requests;
	
	protected RequestController(){
		daoFactory = DAOFactory.getDAOFactory(DAOFactory.CURRENT_IMPLEMENTATION);
		requestDAO = daoFactory.getRequestDAO();
		requests = new ListDataModel<Request>();
	}
	
	public abstract DataModel<Request> getRequests();
}
